<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="index.css" type="text/css">
</head>
<body background="back.jpg">

<div class="container">
    <div class="welcome">
        <h1 class="person">用户登录</h1>
    <div class="index">
        <div class="login">
            <form action="${pageContext.request.contextPath}/LoginServlet" method="post" onsubmit="return check2()">
                <input class="text" type="text" placeholder="账号" id="la"  name="username"><br>
                <input class="password"  type="password" placeholder="密码" id="pa" name="password"><br>
                  <input type="submit" class="button1" value="登录"><br>
            </form>
     <a href="zhuce.jsp" target="_blank"><input type="button" class="button2" value="注册"></a><br>
            <span class="forge">${sta}</span>

        </div>

    </div>
    </div>
</div>
</body>
<script>
    function check2(){
        var username = document.getElementById('la').value
        var password = document.getElementById('pa').value
        if(username==""){
            alert("账号不能为空")
            return false
        }else if(password==""){
            alert("密码不能为空")
            return false
        }else{
            return true
        }
    }


</script>
</html>									
